﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace AdvplDoc.Model {

	class AdvplType {
		private char type = ' ';

		public AdvplType(string type) {
			if (type != null && type.Length > 0)
				this.type = type[0];			
		}

		public AdvplType(char type) {
			this.type = type;
		}

		public override string ToString() {
			switch (this.type) {
				case 'C':
					return "caractere";
				case 'L':
					return "lógico";
				case 'N':
					return "numérico";
				case 'F':
					return "decimal de ponto fixo";
				case 'B':
					return "bloco de código";
				case 'A':
					return "vetor";
				case 'O':
					return "objeto";
				case 'U':
					return "nil";
				case 'D':
					return "data";
				case '*':
					return "any";
				default:
					return ("" + this.type);
			}
		}

	}
}
